import request from '@/utils/request'

import {
  post,
  get
} from "@/utils/request";

export const http_project_tag = {
  createTag: (params) => post('/ZHProject/addLabel', params),
  deleteTag: (params) => post('/ZHProject/delLabel', params),
  relTagList: (params) => get('/ZHProject/getlabelList', params),
  tagList: () => get('/label/queryList'),
}

// 获取项目
export function getProjectApi(data) {
  return request({
    url: '/ManageProjects/getProject',
    method: 'POST',
    formData: true,
    data
  })
}

// 查询项目详情
export function getProDetailApi(data) {
  return request({
    url: '/ProjectCenter/getProjectById',
    method: 'POST',
    formData: true,
    data
  })
}

// 查询会审会审
export function getConsultApi(data) {
  return request({
    url: '/ManageProjects/selectConsultTogether',
    method: 'POST',
    formData: true,
    data
  })
}

// 发起会审会审
export function addConsultApi(data) {
  return request({
    url: '/ManageProjects/addConsultTogether',
    method: 'POST',
    data
  })
}

// 上传会审会审纪要
export function uploadConsultApi(data) {
  return request({
    url: '/ManageProjects/addConsultTogetherSummary',
    method: 'POST',
    data
  })
}

// 查询会审会审详情
export function getConsultDetailApi(data) {
  return request({
    url: '/ManageProjects/selectConsultTogetherById',
    method: 'POST',
    formData: true,
    data
  })
}

// 结束会审会审
export function endConsultApi(data) {
  return request({
    url: '/ManageProjects/endConsultTogether',
    method: 'POST',
    data
  })
}

// 材料批文信息
export function getProjectFileApi(data) {
  return request({
    url: '/ManageProjects/getProjectMatterFile',
    method: 'POST',
    formData: true,
    data
  })
}

// 查询用户问题
export function getProjectHelpApi(data) {
  return request({
    url: '/ProjectEvaluation/getProjectHelp',
    method: 'POST',
    formData: true,
    data
  })
}

// 查询用户问题详情
export function getHelpDetailApi(data) {
  return request({
    url: '/ProjectEvaluation/getHelpById',
    method: 'POST',
    formData: true,
    data
  })
}

// 查询窗口人员信息
export function getAssistantApi(data) {
  return request({
    url: '/CoOrganizeProcess/getAssistant',
    method: 'POST',
    formData: true,
    data
  })
}

// 查询窗口人员问题
export function getAssistantGuarantyApi(data) {
  return request({
    url: '/CoOrganizeProcess/getAssistantGuaranty',
    method: 'POST',
    formData: true,
    data
  })
}

// 问题给窗口人员
export function giveAssistantGuarantyApi(data) {
  return request({
    url: '/CoOrganizeProcess/giveAssistantGuaranty',
    method: 'POST',
    data
  })
}

// 窗口人员解决问题
export function helpAssistantGuarantyApi(data) {
  return request({
    url: '/CoOrganizeProcess/HelpAssistantGuaranty',
    method: 'POST',
    data
  })
}

// 查询预警事件
export function getWarnPageApi(data) {
  return request({
    url: '/zdProcessTemplate/getWarnPage',
    method: 'POST',
    // formData: true,
    data
  })
}

// 取消预警
export function updateWarnStatusApi(data) {
  return request({
    url: '/zdProcessTemplate/updateWarnStatus',
    method: 'POST',
    data
  })
}

// 查看推送记录
export function getProjectFileLoginApi(data) {
  return request({
    url: '/ManageProjects/getProjectFileLogin',
    method: 'POST',
    formData: true,
    data
  })
}

// 推送数据礼包
export function addProjectFileApi(data) {
  return request({
    url: '/ManageProjects/addProjectFiles',
    method: 'POST',
    data
  })
}

// 结束服务
export function helpEndServiceApi(data) {
  return request({
    url: '/CoOrganizeProcess/HelpEndService',
    method: 'POST',
    data
  })
}

// 回答用户问题
export function acceptProblemsApi(data) {
  return request({
    url: '/ManageProjects/acceptProblems',
    method: 'POST',
    data
  })
}

// 查询帮扶详情
export function getHelpByIdApi(data) {
  return request({
    url: '/ProjectEvaluation/getHelpById',
    method: 'POST',
    formData: true,
    data
  })
}
